class CreateAlbums < ActiveRecord::Migration
  def self.up
    create_table :albums do |t|
      t.integer :accounts_id, :null=>false
      t.string :name, :limit => 32
      t.string :intro
      t.string :permission
      t.integer :front
      t.timestamps
    end
    add_index :albums, :accounts_id, :name=>"fk_accounts_album"
  end

  def self.down
    drop_table :albums
  end
end
